package com.solution.delegate;

import java.util.List;

import com.solution.exception.DelegateException;
import com.solution.exception.ServiceBeanException;
import com.solution.exception.ServiceLocatorException;
import com.solution.model.SystemVariable;
import com.solution.service.SystemVariableService;
import com.solution.util.SearchVO;
import com.solution.util.ServiceLocator;

public class SystemVariableServiceDelegate implements SystemVariableService {

	private SystemVariableService systemVariableService;
	
	public SystemVariableServiceDelegate()throws DelegateException
	{		try {
		systemVariableService = (SystemVariableService)ServiceLocator.getInstance().getRemoteService("SystemVariableService");
		} catch (ServiceLocatorException e) {
			throw new DelegateException(e); 
		}
	}
	public SystemVariable create(SystemVariable systemVariable)
			throws ServiceBeanException {
		
		return systemVariableService.create(systemVariable);
	}

	public List<SystemVariable> get(SearchVO searchVO)
			throws ServiceBeanException {
		return systemVariableService.get(searchVO);
	}

	public SystemVariable getValue(String sysVariableName, Long clientId) throws ServiceBeanException {		
		return systemVariableService.getValue(sysVariableName, clientId);
	}

	public SystemVariable update(SystemVariable systemVariable)
			throws ServiceBeanException {		
		return systemVariableService.update(systemVariable);
	}
	public int updateSystemVariables(List<SystemVariable> systemVariableList)
			throws ServiceBeanException {
		// TODO Auto-generated method stub
		return systemVariableService.updateSystemVariables(systemVariableList);
	}

}
